from greenlet import greenlet

def f1():
    print(11)
    g2.switch()
    print(12)
    g2.switch()
def f2():
    print(21)
    g1.switch()
    print(22)



g1 = greenlet(f1)
g2 = greenlet(f2)
g1.switch()
